home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_07 / plauger / isunget.c < prev   
Encoding:
C/C++ Source or Header  |  1994-05-03  |  254 b   |  15 lines

  1. // isunget -- istream::unget()
  2. #include <istream>
  3.  
  4. istream& istream::unget()
  5.     {    // put back last char
  6.     _Chcount = 0;
  7.     _TRY_IO_BEGIN
  8.     if (ipfx(1) && rdbuf()->sungetc() == EOF)
  9.         setstate(badbit);
  10.     isfx();
  11.     _CATCH_IO_END
  12.     return (*this);
  13.     }
  14.  
  15.